package com.ai.bitcoin.jpa.entity;

import lombok.Data;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.springframework.context.annotation.Lazy;

import javax.persistence.*;
import java.util.Date;

/**
 * @description: ${description}
 * @author: gulj
 * @create: 2018-07-13 22:36
 **/

@Entity
@Table(name = "coin_anno2bcc")
@Data
@DynamicUpdate
public class CoinAnno2Bcc {
    @Id
    private int id;
    private Long index;
    @ManyToOne
    @JoinColumn(name = "anno_id", referencedColumnName = "id", insertable = false, updatable = false)
    @NotFound(action = NotFoundAction.IGNORE)
    @Lazy
    private BccAnnoInfoCrawl anno;
    @ManyToOne
    @JoinColumn(name = "bcc_id", referencedColumnName = "bccId", insertable = false, updatable = false)
    @NotFound(action = NotFoundAction.IGNORE)
    @Lazy
    private BccBasicInfo bccInfo;
    private String batchNo;
    private int latest;
    private Date updateTime;
    private String speechUrl;
    private String domain;
    //是否已同步
    private boolean synced;
}
